in two ways

adverbs

in a twofold manner
"he was doubly wrong"